package com.godyao.framework.context.event;

import com.godyao.framework.beans.factory.BeanFactory;
import com.godyao.framework.context.ApplicationEvent;
import com.godyao.framework.context.ApplicationListener;

public class SimpleApplicationEventMulticaster extends AbstractApplicationEventMulticaster{

    public SimpleApplicationEventMulticaster(BeanFactory factory) {
        setBeanFactory(factory);
    }

    @Override
    public void multicastEvent(final ApplicationEvent event) {
        for (final ApplicationListener listener : getApplicationListeners(event)) {
            listener.onApplicationEvent(event);
        }
    }
}
